//Point.h - Class Point

#ifndef _POINT_H_
#define _POINT_H_

#include <iostream>
#include "Gotoxy.h"
#include "Screen.h"

using namespace std;

class Point
{
private:
	int m_x, m_y;	//x,y - coordinates for a point
public:
	Point() : m_x(0), m_y(0) {}	//constructor
	int getX() const {return m_x;};	//returns x value
	int getY() const {return m_y;};	//returns y value
	void setX(int x) {m_x = x;};	//sets a value for x
	void setY(int y) {m_y = y;};	//sets a value for y
	void set(int x, int y) {m_x = x; m_y = y;};	//sets a poit
	void move(int incX, int incY);	//moves a point by increment values
	void draw(char ch) const;	//draws a point acording to char
	void draw(char ch, int incX, int incY) const;	//draws a point with increment values
	void drawToBuffer(char ch, Screen& scr, bool isSplit) const;	//draw point to screen buffer
	void drawToBuffer(char ch, int incX, int incY, Screen& scr, bool isSplit) const;	//draws a point to the screen biuffer with increment values
	int distanceToOtherPoint(const Point otherPoint) const;
	void fixNegativePoint();
};

#endif